_STACKS SEGMENT STACK
        DW  64  DUP (?)
_STACKS ENDS

CODE    SEGMENT
        ASSUME CS:CODE, SS:_STACKS
START:  MOV AX,_STACKS
        MOV SS,AX
NEXT:   MOV AL,00H
        MOV DX,38F3H
        OUT DX,AL
GO:     XOR AX,AX
        MOV DX,38F0H
        IN  AL,DX
        AND AL,01H
        JNZ   NEXT
        MOV AL,02H
        MOV DX,38F3H
        OUT DX,AL
        JMP GO
        HLT
CODE    ENDS
        END START

